import {Navigate} from "react-router-dom"
const Islogin = (WrapComponent)=>{
    return (props)=>{
        console.log();
        if (localStorage.getItem("islogin") == "true") {
            return <WrapComponent {...props} ></WrapComponent>
        } else {
            return <Navigate to="/login"></Navigate>
        }
    }
}
export default Islogin